package common.tests 
{
	import common.IApp;
	import common.IAppBuilder;
	import common.ITest;
	import common.ITestResult;
	import common.TestResult;
	import flash.utils.getQualifiedClassName;
	/**
	 * ...
	 * @author Luke Van In
	 */
	public class AppBuilderTest implements ITest
	{
		
		private var _appBuilder:IAppBuilder;
		
		
		public function AppBuilderTest(appBuilder:IAppBuilder) 
		{
			this._appBuilder = appBuilder;
		}
		

		
		/**
		 * 
		 * @return
		 */
		public function run():ITestResult 
		{
			var app:IApp = this._appBuilder.buildApp();
			
			// test that the builder built an app
			if (app == null)
				return TestResult.fail(this, "application is null");
				
			return TestResult.success(this);
		}
		
		
		
	}

}